<%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2020/12/16
  Time: 15:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page session="true" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>查看管理员列表</title>
</head>
<body>
<%@ include file="adminBanner.jsp" %>
    <h1 style="margin-left: 3%;">查看管理员列表</h1>
    <a href="<c:url value="/admin/addAdmin" /> " style="margin-left:5%;font-size: 20px;">新增管理员</a>    <br>
    <div class="adminList" style="margin-left: 3%">
        <h2 style="margin-left: 1%"> 管理员列表</h2>
        <ul class="adminList">
            <c:forEach items="${adminList.items}" var="item">
                <div>
                    adminID: ${item.adminID}, username: ${item.adminName}
                    <c:if test="${item.adminID eq admin.adminID}">登录管理员自身</c:if>
                    <c:if test="${!(item.adminID eq admin.adminID) && item.isDelete eq false}">
                        <a href="<c:url value="/admin/deleteAdmin/${item.adminID }" />">点击删除</a>
                    </c:if>
                </div>
                <hr>
            </c:forEach>
        </ul>
    </div>
    每页${adminList.pageSize}个管理员，第${adminList.currentPageNo}/${adminList.totalPageCount}页，共${adminList.totalCount}个管理员<br>
    <c:if test="${adminList.previousPage}">
        <a href="<c:url value="/admin/adminList?pageNo=${managerList.currentPageNo-1}" />">上一页</a>
    </c:if>
    <c:if test="${adminList.nextPage}">
        <a href="<c:url value="/admin/adminList?pageNo=${managerList.currentPageNo+1}" />">下一页</a>
    </c:if>
<%@ include file="footer.jsp" %>
</body>
</html>
